package com.itheima.String.api;
//nextLine()与整数一起接收
//虽然有丢失，但是还有录入机会
import java.util.Scanner;

public class Demo2Scanner {
    public static void main(String[] args) {
        //创建对象
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入整数");
        int sum= sc.nextInt();
        System.out.println("请输入字符串");
        String s = sc.nextLine();
        System.out.println(sum);
        System.out.println(s);
    }
}